package bman.game.engine.client;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.awt.Insets;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.swing.JButton;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTextField;

import bman.game.battletank.GamePanel;

/**
 * THIS NO LONGER WORKS.
 * This was used for testing. It will open four frames all at once.
 */
public class MultiConsoleForm extends JFrame
{

	public MultiConsoleForm()
	{
		addWindowListener(new WindowAdapter(){
			public void windowClosing(WindowEvent we)
			{
				System.exit(0);
			}
		});
		
		initGUI();
		this.setVisible(true);
	}	
	
	private void initGUI()
	{
		try
		{
			GamePanel g1 = new GamePanel();
			GamePanel g2 = new GamePanel();
			GamePanel g3 = new GamePanel();
			GamePanel g4 = new GamePanel();
			
			GridLayout thisLayout = new GridLayout(1,1);
			thisLayout.setColumns(2);
			thisLayout.setRows(2);
			thisLayout.setHgap(5);
			thisLayout.setVgap(5);
			getContentPane().setLayout(thisLayout);
			getContentPane().add(g1);
			getContentPane().add(g2);
			getContentPane().add(g3);
			getContentPane().add(g4);
			{
				this.setSize(850, 850);
			}
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
	
	public static void main(String[] args0)
	{
		new MultiConsoleForm();
	}
}
